<?php include 'application/views/header.php' ?>
<?php // echo '<pre>'; print_r($Pictures); die; ?>
<script type="text/javascript" src="<?php echo base_url() ?>public/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>public/ckfinder/ckfinder.js"></script>
<h4 class="page-title">Hình ảnh banner</h4>
<form accept="<?php echo base_url() ?>picturehome/edit/<?php echo $Pictures['PictureHomeId'] ?>" 
accept=""method="post" id="frmPageEdit" enctype="multipart/form-data">
    <table width="100%" class="form page-edit">       
       <tr>
            <th>Tiêu đề</th>
            <td><input type="text" value="<?php echo $Pictures['Title'] ?>" name="Title" id="Title"/></td>
       </tr>
       <tr>
            <th>Mô tả</th>
            <td>                
                <textarea name="Summary" id="Summary"><?php echo $Pictures['Summary'] ?></textarea>
            </td>
       </tr>  
       <tr>
            <th>Hình ảnh</th>
            <td>
                <?php if(!empty($Pictures['PictureLink'])): ?>
                    <img width="150" src="<?php echo $this->config->item('base_download') ?>/pictures/<?php echo $Pictures['PictureLink'] ?>"/><br/>
                <?php endif; ?>
                <input type="file" name="PictureLink" id="PictureLink" />
            </td>
       </tr>
    </table>
    <div class="clr button-set">
        <input type="submit" value="Lưu nội dung" id="btnSave" />
        <input type="reset" value="Hủy nội dung vừa nhập" id="btnReset" />
        <input type="button" value="Về danh sách" id="btnBack" />
    </div>
</form>
<?php include 'application/views/footer.php' ?>
<script>
$('#btnBack').click(function(){
    window.location.href = '<?php echo base_url() ?>picturehome.html'; 
});
var ck = CKEDITOR.replace( 'ProductDetail', { toolbar : 'Full'});
CKFinder.setupCKEditor( ck, { 
    basePath : '/admin/public/ckfinder/' 
} ) ;
var ck = CKEDITOR.replace( 'ProductCompare', { toolbar : 'Full'});
CKFinder.setupCKEditor( ck, { 
    basePath : '/admin/public/ckfinder/' 
} ) ;
var ck = CKEDITOR.replace( 'ProductGeneral', { toolbar : 'Full'});
CKFinder.setupCKEditor( ck, { 
    basePath : '/admin/public/ckfinder/' 
} ) ;
var ck = CKEDITOR.replace( 'ProductPicture', { toolbar : 'Full'});
CKFinder.setupCKEditor( ck, { 
    basePath : '/admin/public/ckfinder/' 
} ) ;
var ck = CKEDITOR.replace( 'ProductFuture', { toolbar : 'Full'});
CKFinder.setupCKEditor( ck, { 
    basePath : '/admin/public/ckfinder/' 
} ) ;
</script>